IF EXISTS (SELECT * FROM sysobjects WHERE type = 'V' AND name = 'VW_WebsiteFetch')
	BEGIN
		DROP  View VW_WebsiteFetch
	END
GO

CREATE View VW_WebsiteFetch AS

SELECT
	w.WebsiteId, w.ClientId, c.Guid AS ClientGuid, w.TypeFlags, w.Title, w.CreateDate, w.UpdateDate, w.Guid
FROM Websites AS w
	INNER JOIN Clients AS c ON w.ClientId = c.ClientId

GO
